﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"  EnableEventValidation="false"
    CodeFile="AssembleDetailAdd.aspx.cs" Inherits="Assemble_AssembleDetailAdd" Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <%--<script type="text/javascript" src="../../js/JudgeInput.js"></script>--%>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="text-align: center;">
                <br />
                <br />
                <div style="text-align: center; clear: both; height: 34px; width: 70%; margin: 0 auto;">
                    <table style="width: 100%; border: 1px solid black">
                        <tr>
                            <td>
                                产品类型：<asp:TextBox ID="TextBox4" runat="server" TabIndex="11" AutoPostBack="True"
                                    OnTextChanged="TextBox4_TextChanged"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator4"
                                        runat="server" ControlToValidate="TextBox4" ErrorMessage="不能为空" ValidationGroup="VGroup1"
                                        Display="Dynamic" EnableClientScript="False"></asp:RequiredFieldValidator>&nbsp;
                            </td>
                            <td>
                                MO：<asp:TextBox ID="TextBox5" runat="server" TabIndex="12" AutoPostBack="True" OnTextChanged="TextBox5_TextChanged"></asp:TextBox><asp:RequiredFieldValidator
                                    ID="RequiredFieldValidator5" runat="server" ControlToValidate="TextBox5" ErrorMessage="不能为空"
                                    ValidationGroup="VGroup1" Display="Dynamic" EnableClientScript="False"></asp:RequiredFieldValidator><asp:RequiredFieldValidator
                                        ID="RequiredFieldValidator6" runat="server" ControlToValidate="TextBox5" ErrorMessage="*"
                                        ValidationGroup="VGroup3"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <asp:Button ID="Button3" runat="server" Text="调出最近关键物料批次详细" OnClick="Button3_Click"
                                    ValidationGroup="VGroup3" TabIndex="13" />
                            </td>
                        </tr>
                    </table>
                </div>
                <br />
                <br />
                <div style="text-align: center; clear: both; width: 70%; height: 34px; margin: 0 auto;">
                    <table style="width: 100%; border: 1px solid black">
                        <tr>
                            <td style="width: 60%;">
                                腔体序列号：<asp:TextBox ID="TextBox1" runat="server" TabIndex="1" AutoPostBack="True"
                                    OnTextChanged="TextBox1_TextChanged" ValidationGroup="VGroup1"></asp:TextBox><asp:RequiredFieldValidator
                                        ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="不能为空"
                                        ValidationGroup="VGroup1" Display="Dynamic" EnableClientScript="False"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                    </table>
                </div>
                <br />
                <br />
                <div style="text-align: center; clear: both; height: 92px; width: 70%; margin: 0 auto;
                    border: 1px solid black">
                    <br />
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                批次对应数量
                            </td>
                            <td>
                                批次序列号
                            </td>
                            <td>
                                物料类型
                            </td>
                            <td>
                                备注
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:TextBox ID="TextBox7" runat="server" TabIndex="21"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="TextBox7"
                                    Display="Dynamic" EnableClientScript="False" ErrorMessage="不能为空" ValidationGroup="VGroup2"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox2" runat="server" AutoPostBack="True" OnTextChanged="TextBox2_TextChanged"
                                    TabIndex="22" ValidationGroup="VGroup2"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2"
                                    Display="Dynamic" EnableClientScript="False" ErrorMessage="不能为空" ValidationGroup="VGroup2"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3"
                                    ErrorMessage="不能为空" ValidationGroup="VGroup2" Display="Dynamic" EnableClientScript="False"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox6" runat="server" OnTextChanged="TextBox6_TextChanged"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                    <br />
                </div>
                <div style="text-align: center; clear: both; width: 70%; border: 1px solid Black;
                    margin: 0 auto;">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%"
                        BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3"
                        CellSpacing="1" GridLines="None" OnRowDataBound="GridView1_RowDataBound" OnRowDeleting="GridView1_RowDeleting">
                        <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
                        <Columns>
                            <asp:BoundField DataField="BatchID" HeaderText="批次序列号" />
                            <asp:BoundField DataField="StuffTypeID" HeaderText="物料类型" />
                            <asp:BoundField DataField="Amount" HeaderText="批次剩余数量" />
                            <asp:BoundField DataField="Remark" HeaderText="备注" />
                            <asp:CommandField HeaderText="选择" ShowDeleteButton="True" />
                        </Columns>
                        <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
                        <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                        <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
                    </asp:GridView>
                    <br />
                    <br />
                </div>
                <br />
                <br />
                <div style="clear: both;">
                    注1：扫描腔体序列号，即可提交相应记录<br />
                    注2：扫描批次序列号，即可添加相应批次物料，如果有数量，请先输入数量，如果有备注，请先输入备注
                </div>
                <br />
                <br />
                <br />
                <asp:HiddenField ID="confirmReturnValue" runat="server" />
                <asp:LinkButton ID="LinkButton1" runat="server" Visible="false" OnClick="LinkButton1_Click"></asp:LinkButton>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

    <script language="javascript" type="text/javascript">     
    function GetConfirm()  
    { 
        var confirmReturnValueCon = document.getElementById('<%=confirmReturnValue.ClientID%>');               
 
        if (confirm('此产品序列号已经录入过物料装配信息，是否要继续？'))           
        { 
            confirmReturnValueCon.value = "True";  
        } 
        else 
        { 
            confirmReturnValueCon.value = "False"; 
        } 
 
         __doPostBack("<%= LinkButton1.UniqueID %>", "");  
    } 
    </script>

</asp:Content>
